﻿using System.Windows.Controls;
using Microsoft.Practices.Prism.Commands;

public class ListBoxSelectionChangedCommandBehavior : CommandBehaviorBase<ListBox>
{
	public ListBoxSelectionChangedCommandBehavior(ListBox listBox) : base(listBox)
	{
		listBox.SelectionChanged += SelectionChangedHandler;
	}
	void SelectionChangedHandler(object sender, SelectionChangedEventArgs e)
	{
		ExecuteCommand();
	}
}

